package com.stox.ui.javafx.charting.model.cursor;

import javafx.scene.input.MouseEvent;

import com.stox.ui.javafx.charting.view.ChartingView;

public abstract class AbstractStoxChartingCursor implements StoxChartingCursor {

	private double x;
	private double y;
	
	private double sceneX;
	private double sceneY;
	
	private double screenX;
	private double screenY;
	
	@Override
	public void handle(MouseEvent event) {
		x = event.getX();
		y = event.getY();
		
		sceneX = event.getSceneX();
		sceneY = event.getSceneY();
		
		screenX = event.getScreenX();
		screenY = event.getScreenY();
		
		ChartingView view = (ChartingView)event.getSource();
		view.update();
	}

	public double getX() {
		return x;
	}

	public double getY() {
		return y;
	}

	public double getSceneX() {
		return sceneX;
	}

	public double getSceneY() {
		return sceneY;
	}

	public double getScreenX() {
		return screenX;
	}

	public double getScreenY() {
		return screenY;
	}

}
